home *** CD-ROM | disk | FTP | other *** search
/ El Mac 1 / Magazine.iso / EL MAC 1 / Shareware / HyperCard / XCMD Docs / CompileIt! Source Code / GetFactors(num) < prev    next >
Encoding:
Text File  |  1995-08-19  |  179 b   |  8 lines  |  [TEXT/ttxt]

  1. function GetFactors num
  2.   put num*1 into x
  3.   repeat with y=1 to x
  4.     if (x mod y)=0 then put y & "," after list
  5.   end repeat
  6. delete last char of list
  7.   return list
  8. end GetFactors